package aug14;

class Parent{
	String msg = "Parent class";
	public String getMsg(){
		return msg;
	}
}
class Child extends Parent{
	String msg = "child classs";
	public String getMsg(){
		return msg;
	}
}

public class OverridingEx {
	public static void main(String[] args){
		Child cd = new Child();
		System.out.println("cd : "+cd.getMsg());
		Parent pt = new Parent();
		System.out.println("pt : "+pt.getMsg());
		Parent pt2 = new Child();
		System.out.println("pt : "+pt2.getMsg());
		
	}
}
